import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm';

import { ApiProperty } from "@nestjs/swagger";

@Entity({ name: 'nav_config' })
export class NavConfigEntity {

    @PrimaryGeneratedColumn()
    @ApiProperty({ description: '' })
    id: number

    @Column()
    @ApiProperty({ description: '图片标题' })
    title: string

    @Column()
    @ApiProperty({ description: '图片链接' })
    imgUrl: string

    @Column()
    @ApiProperty({ description: '图片类型 0 无跳转 1 商品详情 2 活动页 3 外链' })
    type: number

    @Column()
    @ApiProperty({ description: '跳转地址' })
    jumpAddress: string

    @Column()
    @ApiProperty({ description: '排序' })
    sort: number

    @CreateDateColumn()
    @ApiProperty({ description: '创建时间' })
    createdTime: Date

    @UpdateDateColumn()
    @ApiProperty({ description: '更新时间' })
    updatedTime: Date

} 